/* @JUDGE_ID: sebastianffx 100 C++ "Dynamic Programming" */

/* @BEGIN_OF_SOURCE_CODE */
#include <iostream>
#include <fstream>
using namespace std;

#define SIZE 1000001
static unsigned short output[SIZE];

int max_cycle_lenght = 0;
int path_lenght = 0;

unsigned short three_n_plus_one_conjecture(register unsigned long number){
  if(number == 1){
    path_lenght++;
    if(path_lenght>max_cycle_lenght){
      max_cycle_lenght = path_lenght;
    }
    path_lenght = 0;
    return 0;
  }
  if(number%2==1){
    number = 3*number +1;
    path_lenght++;
  } 
  else{
    number = number/2;
    path_lenght++;
  }
  three_n_plus_one_conjecture(number);
}

int main(){
  int index = 0; 
  int output[10000];
  int inf, sup, temp;
while (cin>>inf>>sup){
  if(inf < sup){
    for(int i = inf; i<=sup; i++){
      three_n_plus_one_conjecture(i);
      output[index] = inf;
      output[index+1] = sup;
      output[index+2]  = max_cycle_lenght;
    }
 }
  else{
    for(int i = sup; i<=inf; i++){
      three_n_plus_one_conjecture(i);
      output[index] = inf;
      output[index+1] = sup;
      output[index+2]  = max_cycle_lenght;
    }
 }
 


  cout << output[index]<<" "<<   output[index+1] <<" "<<output[index+2]<<endl;
  max_cycle_lenght = 0;
  index= index +3;

 }
  return 0;
}

/* @END_OF_SOURCE_CODE */
